package GUI;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.Point;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.ImageIcon;
import java.awt.Dimension;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Dialog.ModalityType;

public class AboutDialog extends JDialog {

	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			AboutDialog dialog = new AboutDialog(new Point(400,200));
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public AboutDialog(Point point) {
		setModalityType(ModalityType.APPLICATION_MODAL);
		setModal(true);
		setResizable(false);
		setTitle("About");
		setBounds(point.x, point.y, 332, 283);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JButton btnClose = new JButton("Close");
			btnClose.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					setVisible(false);
				}
			});
			btnClose.setBounds(136, 221, 77, 23);
			contentPanel.add(btnClose);
			btnClose.setActionCommand("OK");
			getRootPane().setDefaultButton(btnClose);
		}
		
		JLabel lblSqlServer = new JLabel("SQL server");
		lblSqlServer.setFont(new Font("Tahoma", Font.BOLD, 20));
		lblSqlServer.setBounds(135, 11, 142, 34);
		contentPanel.add(lblSqlServer);
		
		JLabel label = new JLabel("0912234");
		label.setFont(new Font("Tahoma", Font.BOLD, 15));
		label.setBounds(89, 66, 104, 14);
		contentPanel.add(label);
		
		JLabel lblTrnnhKhi = new JLabel("Tr\u1EA7n \u0110\u00ECnh Kh\u00F4i");
		lblTrnnhKhi.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblTrnnhKhi.setBounds(182, 56, 127, 34);
		contentPanel.add(lblTrnnhKhi);
		
		JLabel label_1 = new JLabel("0912245");
		label_1.setFont(new Font("Tahoma", Font.BOLD, 15));
		label_1.setBounds(89, 157, 104, 14);
		contentPanel.add(label_1);
		
		JLabel label_2 = new JLabel("Nguy\u1EC5n H\u1EEFu K\u1EF3");
		label_2.setFont(new Font("Tahoma", Font.PLAIN, 15));
		label_2.setBounds(182, 147, 127, 34);
		contentPanel.add(label_2);
		
		JLabel label_3 = new JLabel("New label");
		label_3.setIcon(new ImageIcon("E:\\CULUN\\Giao trinh\\HK6\\Java\\Thuc hanh\\a Nop Bai\\Eclips\\SQLserver\\res\\0912245.jpg"));
		label_3.setBounds(10, 120, 69, 85);
		contentPanel.add(label_3);
		
		JLabel label_4 = new JLabel("New label");
		label_4.setSize(new Dimension(70, 87));
		label_4.setIcon(new ImageIcon("E:\\CULUN\\Giao trinh\\HK6\\Java\\Thuc hanh\\a Nop Bai\\Eclips\\SQLserver\\res\\0912234_2.jpg"));
		label_4.setBounds(10, 25, 69, 84);
		contentPanel.add(label_4);
	}

}
